package com.eol.entity.po.content;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 图片视频表
 *
 * @author liulinhui
 * @email 1249055292@qq.com
 * @date 2020-06-04 13:03:10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("图片视频表")
public class ZMedia implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @Id
    private String id;

    @ApiModelProperty(value = "名字")
    @NotNull(message = "名字不能为空")
    private String name;

    @ApiModelProperty(value = "类型  1:图片  2:视频")
    @NotNull
    private Integer type;

    @ApiModelProperty(value = "视频封面")
    private String coverUrl;

    @ApiModelProperty(value = "图片/视频地址")
    @NotNull
    @Column(name = "url")
    private JSONArray url;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "图片热区")
    @Column(name = "hot_zone")
    private JSONArray hotZone;

    @ApiModelProperty(value = "是否可删除 1：可以  0：不可以")
    private Boolean canDel;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "商户ID")
    private String merchantId;

    @ApiModelProperty(value = "商户ID List")
    @Transient
    private List<String> merchantIdList;
    @Transient
    private Date startTime;
    @Transient
    private Date endTime;

}
